The present invention relates to providing shared dataset access to batch and transaction processes, and more specifically, this invention relates to avoiding contention caused by competing workloads.
Running batch workloads concurrently with online transaction processing (OLTP) workloads against a common or shared dataset provides a number of challenges. Further, the challenges due to competing workloads become more pronounced as dedicated batch windows are shortened due to globalization and 24×7 business models, etc.
To limit contention, batch jobs that cooperate with OLTP workloads typically employ a micro-batching strategy, in which a monolithic batch job is partitioned into a number of smaller batches, referred to as micro-batches, each of which is a separate transaction.
A tension between the batch and OLTP is expressed in the selection of the size of each micro-batch. Each micro-batch, as a separate transaction, retains locks on records in the micro-batch until commit. These retained locks can block other workloads, whether batch or OLTP. Accordingly, larger micro-batches can lead to significant wait times for competing workloads trying to access records already locked by the batch workload. Further, micro-batches not only hold locks required by other workloads, but they can also wait for a lock held by other workloads. A given micro-batch waiting for a lock is not only delayed by the wait, it also extends the wait of all the other workloads waiting for access to records currently locked and held by the given micro-batch.
In a higher contention system, with multiple batch jobs and high OLTP rates these micro-batch waits can lead to cascading performance problems.